<%@ page language="java" import="java.util.*,start.fly.test.database.databaseTool" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>My JSP 'add_user_do.jsp' starting page</title>
    
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
   <%request.setCharacterEncoding("utf-8"); %>
 <%
           String title=request.getParameter("title");
           String content=request.getParameter("content");
           String author=request.getParameter("author");
           databaseTool data=new databaseTool();
		   boolean isInsert=data.insertToNotice(title, content, author);
	       if(isInsert){
	    	   out.print("<script>alert('发布公告成功');document.location='noticeManager.jsp'</script>");  
	       }else{
	    	   out.print("<script>alert('发布公告失败');document.location='noticeManager.jsp'</script>");  
	       }
 %>
  </body>
</html>
